package com.dvd.utils;
import java.lang.reflect.*;
import java.util.*;
import java.text.*;
public class TestDate {
	public static void main(String [] args)
	{
		/*
		Date date =new Date();
		Method methods[] = Date.class.getMethods();
		Field fields[] =Date.class.getFields();
		for(Method method : methods)
		{
			System.out.println("Method: " + method.getName());
			
		}
		for(Field field : fields)
		{
			System.out.println("Field:" + field.getType().getName());
		}
		System.out.println(System.getProperty("java.version"));
		*/
		Date date= new Date();
		long time = date.getTime();
		DateFormat df = DateFormat.getDateInstance();
		Date date2=new Date(time);
		/*
		try {
			date2 = df.parse(dateString);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		*/
		System.out.println(date2);
		try {
			System.out.println(((Date)df.parseObject("2008-08-16")).getTime());
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}
}
